#!/bin/bash
path=/home/syx/shell/function
filename=log.txt
[ -f "$path/$filename" ]&& touch "$path/$filename"
DATETIME=$(date +%Y-%m-%d_%H%M%S)
echo "$DATETIME" >> "$path/$filename"
